<?php
$router->group(['middleware' => 'base'], function() {

    Route::any('member/index','MemberController@doIndex');
    Route::controller('member','MemberController');

    Route::get('train/index','TrainController@index');
    Route::get('train/{train}/detail','TrainController@getDetail');
    Route::post('train/join','TrainController@doJoin');
    Route::get('train/my','TrainController@getMyTrain');

    Route::get('match/index','MatchController@index');
    Route::get('match/{match}/detail','MatchController@getDetail');
    Route::post('match/join','MatchController@doJoin');
    Route::get('match/my','MatchController@getMyMatch');

//场地预定
//Route::get('space/index','SpaceController@index');
    Route::get('space/{space}/detail','SpaceController@getDetail');
    Route::controller('space','SpaceController');
//约战
//Route::get('match/create','MatchController@index');
    Route::get('fight/{fight}/detail','FightController@getDetail');
    Route::get('fight/{fight}/edit','FightController@getEdit');
    Route::post('fight/join','FightController@doJoin');
    Route::post('fight/changeStatus','FightController@doChange');
    Route::get('fight/myApply','FightController@getMyApply');
    Route::controller('fight','FightController');
//拼场
//Route::get('match/create','MatchController@index');
    Route::get('spaceShare/{spaceShare}/detail','SpaceShareController@getDetail');
    Route::get('spaceShare/{spaceShare}/edit','SpaceShareController@getEdit');
    Route::post('spaceShare/join','SpaceShareController@doJoin');
    Route::get('spaceShare/myApply','SpaceShareController@getMyApply');
    Route::post('spaceShare/changeStatus','SpaceShareController@doChange');
    Route::controller('spaceShare','SpaceShareController');


//场地
    Route::get('spaceOrder/{spaceOrder}/detail','SpaceController@getDetail');
//支付
    Route::any('pay/recharge','PayController@doRecharge');
//Route::any('pay/test','PayController@CallTest');//支付异步测试
    Route::post('pay/return_call','PayController@doReturnCall');
    Route::post('pay/return_asyn_call','PayController@doReturnAsynCall');



    Route::controller('/','HomeController');
});







